package bob.project.object;

import org.newdawn.slick.geom.Rectangle;

import bob.project.slick.GameState;

public abstract class MovableObject extends GameObject
{
	float speed;
	boolean moveLeft = true;
	
	
	public boolean tryMoveTo(float xx, float yy)
	{
		Rectangle newRect = new Rectangle(xx,yy,width,height-1);
		for(GameObject obj : GameState.instance.objects)
			if (obj.rect.intersects(newRect))
				return false;
		return true;
	}
	
}
